#include <iostream>
#include <unistd.h>
using std::cout;
using std::endl;
using std::cerr;

void test0(){
    for(int idx = 0; idx < 1024; ++idx){
        cout << 'a';
        /* cout << 'a' << endl; */
    }
    cout.flush();
    sleep(2);
}

void test1(){
    for(int idx = 0; idx < 1024; ++idx){
        //标准错误流用来输出错误信息，不带缓冲
        cerr << 'a';
    }
    sleep(2);
}

int main(void){
    test1();
    return 0;
}
